package com.dg.cuckoo.admin.repository;

import com.dg.cuckoo.admin.dto.basicInformation.label.OneLabelDto;
import com.dg.cuckoo.admin.dto.basicInformation.label.TwoLabelDto;
import com.dg.cuckoo.admin.dto.basicInformation.permissionSettings.UnitTypeDto;
import com.dg.cuckoo.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TwoLableRepository extends BaseRepository<TwoLabelDto, String> {

    List<TwoLabelDto> findTwoLabelDtosByOneLabel(String oneLabel);

    TwoLabelDto findByOneLabel(String oneLabel);

    @Query(value = "select * from two_label limit ?,?",nativeQuery = true)
    List<TwoLabelDto> page(Integer page, Integer pageSize);

    TwoLabelDto findByLabelName(String labelName);



}
